package cn.rongdao.jrkabao.model;

import com.mifengkong.frtools.http.request.HttpFunction;

import cn.rongdao.jrkabao.bean.main.ChannelBean;
import cn.rongdao.jrkabao.model.api.BaseSuDaiModel;
import io.reactivex.Observable;
import io.reactivex.Observer;

/**
 * Created by jack on 2017/12/14
 */

public class GetChannelModel extends BaseSuDaiModel {

    public static GetChannelModel getInstance() {
        return getPresent(GetChannelModel.class);
    }

    public void execute(Observer<ChannelBean> observer) {
        addParamStrings("source_id", "kamaoxinrenduanxin1");
        Observable<ChannelBean> observable = mServletApi.getChannel(mParams).map(new HttpFunction<ChannelBean>());
        toSubscribe(observable, observer);
    }
}
